﻿@model StarterKit.Web.Models.RegisterModel
@using BootstrapSupport
@{
    ViewBag.Title = "Manage Account";
}

@using (var form = Html.Bootstrap().BeginForm(new { @class = "well"}))
{
	@Html.AntiForgeryToken()
	<legend>@ViewBag.Title</legend>
    using (var group = form.BeginControlGroup())
    {
		group.ControlLabelFor(m => m.UserName);
        using (var controls = group.BeginControlsSection())
        {
			@Html.TextBoxFor(m => m.UserName, new { @class = "span4", @id = "username", @name = "username", @type = "text" })
			@Html.ValidationMessageFor(m => m.UserName, null, new { @class = "help-inline" })
        }
	}
	using (var group = form.BeginControlGroup())
	{
		group.ControlLabelFor(m => m.FirstName);
		using (var controls = group.BeginControlsSection())
		{
			@Html.TextBoxFor(m => m.FirstName, new {@class = "span4", @id = "FirstName", @name = "FirstName", @type = "text"})
			@Html.ValidationMessageFor(m => m.FirstName, null, new {@class = "help-inline"})
		}
	}
	using (var group = form.BeginControlGroup())
	{
		group.ControlLabelFor(m => m.LastName);
		using (var controls = group.BeginControlsSection())
		{
			@Html.TextBoxFor(m => m.LastName, new {@class = "span4", @id = "LastName", @name = "LastName", @type = "text"})
			@Html.ValidationMessageFor(m => m.LastName, null, new {@class = "help-inline"})
		}
	}
	using (var group = form.BeginControlGroup())
	{
		group.ControlLabelFor(m => m.Email);
		using (var controls = group.BeginControlsSection())
		{
			@Html.TextBoxFor(m => m.Email, new {@class = "span4", @id = "Email", @name = "Email", @type = "text"})
			@Html.ValidationMessageFor(m => m.Email, null, new {@class = "help-inline"})
		}
	}

	using (var group = form.BeginControlGroup())
	{
		group.ControlLabelFor(m => m.Roles);
		using (var controls = group.BeginControlsSection())
		{
			@Html.ListBoxFor(m => m.Roles, ViewBag.AvailableRoles as MultiSelectList, new {@class = "chzn-select span4", multiple = "multiple"})	
			@Html.ValidationMessageFor(m => m.Roles, null, new {@class = "help-inline"})
		}
	}
	<div class="form-actions">
		@Html.Bootstrap().SubmitButton("Save",BootstrapNamedColor.Info)
		@Html.ActionLink("Cancel", "SecurityDashboard","Account")
	</div>
}